package com.oa.modules.approvalsec1.service.impl;

import com.oa.common.utils.AppUtils;
import com.oa.modules.approvalsec1.entity.LicenceEntity;
import com.oa.modules.approvalsec1.entity.StatuteInfoEntity;
import org.springframework.stereotype.Service;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.oa.common.utils.PageUtils;
import com.oa.common.utils.Query;

import com.oa.modules.approvalsec1.dao.StatuteLibraryDao;
import com.oa.modules.approvalsec1.entity.StatuteLibraryEntity;
import com.oa.modules.approvalsec1.service.StatuteLibraryService;


@Service("statuteLibraryService")
public class StatuteLibraryServiceImpl extends ServiceImpl<StatuteLibraryDao, StatuteLibraryEntity> implements StatuteLibraryService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage page= AppUtils.getPage(new Query<StatuteLibraryEntity>(), params);
        return AppUtils.setPage(page, baseMapper.findPage(params), baseMapper.findRecords(page, params));
    }

    @Override
    public List<StatuteLibraryEntity> getTree() {
        return baseMapper.getTree();
    }

    @Override
    public List<StatuteLibraryEntity> getTextByIds(Integer[] ids) {
        return baseMapper.getTextByIds(ids);
    }

    @Override
    public List<StatuteLibraryEntity> selectTree() {
        return baseMapper.selectTree();
    }

    @Override
    public List<StatuteLibraryEntity> getChildrenByName(String name) {
        return baseMapper.getChildrenByName(name);
    }

    @Override
    public List<StatuteLibraryEntity> getChildrenByName2(String name) {
        return baseMapper.getChildrenByName2(name);
    }

    @Override
    public StatuteLibraryEntity getInfoById(Integer id) {
        return baseMapper.getInfoById(id);
    }

    @Override
    public void insertRecord(Integer[] ids) {
        baseMapper.insertRecord(ids);
    }

    @Override
    public List<Map> getDataByCategory() {
        return baseMapper.getDataByCategory();
    }

    @Override
    public List<LinkedHashMap> getDataByMonth() {
        return baseMapper.getDataByMonth();
    }

    @Override
    public List<Map> getDataViews() {
        return baseMapper.getDataViews();
    }

    @Override
    public void insertInfo(StatuteInfoEntity statuteinfo) {
        baseMapper.insertInfo(statuteinfo);
    }

    @Override
    public List<Map> getStatuteInfoTotal(Map<String, Object> params) {
        return baseMapper.getStatuteInfoTotal(params);
    }

    @Override
    public List<StatuteInfoEntity> getStatuteInfoList(Map<String, Object> params) {
        return baseMapper.getStatuteInfoList(params);
    }

    @Override
    public List<StatuteInfoEntity> selectStatuteInfo(StatuteInfoEntity statuteinfo) {
        return baseMapper.selectStatuteInfo(statuteinfo);
    }

}